#include <iostream>
using namespace std;

long long factorial(int n) {
  if (n == 1) {
    return 1;
  }
  return n * factorial(n - 1);
}
int main() {
  int n;
  cin >> n;
  double e = 1.0;
  for (int i = 1; i <= n; i++) {
    e += 1.0 / factorial(i); 
  }
  cout.precision(10);
  cout << fixed << e << endl;
  return 0;
}